package com.diyizu.enter;

import com.diyizu.controller.ILoginController;
import com.diyizu.controller.IRegController;
import com.diyizu.controller.IStudentInfoController;
import com.diyizu.factory.Factory;

import java.util.Scanner;

/**
 * 入口类
 */
public class Enter {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        IRegController regController = Factory.getIRegController();
        ILoginController loginController = Factory.getILoginController();

        while (true){
            System.out.println("--------欢迎来到学生信息管理系统--------");
            System.out.println("1.注册  2.登录  3.退出程序");
            String choose = sc.next();
            switch (choose){
                case "1":
                    regController.userReg();
                    break;
                case "2":
                    loginController.userLogin();
                    break;
                case "3" :
                    System.out.println("再见");
                    return;
                default:
                    System.out.println("您的输入有误，请重新输入");
            }
        }
    }
}
